<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="demo">

  </div>
</body>
<script>
  var str = " 上海孚正生物科技有限公司"
  var i = 0;
  function typing() {
    var demo = document.getElementById('demo')
    if (i <= str.length) {
      demo.innerHTML = str.slice(0, i++) + "丨";
      setTimeout("typing()", 200)

    } else {
      demo.innerHTML = str;
    }
  }
  typing();

</script>

</html>